import request from '@/utils/request'

//日志列表
export function fetchList(data) {
  return request({
    url: `/analysiscenter/logSearch/listByAndor`,
    method: 'post',
    data
  })
}
// export function fetchList(params) {
//   return request({
//     url: `/ark-analysis/logSearch/listBySql`,
//     method: 'get',
//     params
//   })
// }

//日志详情
export function fetchDetail(query) {
  return request({
    url: `/analysiscenter/logSearch/logDetail`,
    method: 'get',
    params: query
  })
}

//事件类型列表
export function fetchEventTypes(query) {
  return request({
    url: `/analysiscenter/logSearch/indexExtraInfo`,
    method: 'get',
    params: query
  })
}

//自定义查询列表
export function fetchCustomList(query) {
  return request({
    url: `/analysiscenter/logSearch/queryColumnStat`,
    method: 'get',
    params: query
  })
}

//高级筛选名称列表
export function recordList(query) {
  return request({
    url: `/analysiscenter/searchCond/list`,
    method: 'get',
    params: query
  })
}

//高级筛选 新增记录
export function recordAdd(data) {
  return request({
    url: `/analysiscenter/searchCond/add`,
    method: 'post',
    data
  })
}

//高级筛选 修改记录
export function recordEdit(data) {
  return request({
    url: `/analysiscenter/searchCond/edit`,
    method: 'post',
    data
  })
}

//高级筛选 删除记录
export function recordDelete(data) {
  return request({
    url: `/analysiscenter/searchCond/remove`,
    method: 'post',
    data
  })
}

//根据ip查询资产信息
export function getAssetInfo(params) {
  return request({
    url: `/analysiscenter/source/getAssetInfo`,
    method: 'get',
    params
  })
}